package com.zty.spring.cloud.contorller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.zty.spring.cloud.entity.City;
import com.zty.spring.cloud.service.CityDataService;

/**
 * City Controller
 * @author Administrator
 *
 */
@RestController
@RequestMapping("/cities")
public class CityContorller {
	
	@Autowired
	private CityDataService cityDataService;
	
	@GetMapping
	public List<City> listCity() throws Exception {
		return cityDataService.findByListCity();
	}
}
